package com.itheima.service;


import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.OrderSetingDelDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.text.SimpleDateFormat;
import java.util.Date;

@Service
@Transactional
public class OrderSettingDelImpl implements OrderSettingDel {

    @Autowired
    OrderSetingDelDao orderSetingDelDao;

    @Override
    public void clear(Date date) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String format = sdf.format(date);
        orderSetingDelDao.clear(format);
    }
}
